<div id="list">
<?php if (count($item_list)): ?>
<table class="paginacao" cellpadding="2" cellspacing="0" width="100%" align="center">
	<tr>
		<td align="left"><?php $pager_layout->displayResultados(); ?></td>
		<td align="right"><?php $pager_layout->display(array('nourl'=>true)); ?></td>
	</tr>
</table>
<?php endif; ?>

<table class="list">
	<thead>
    <tr>
	    <th><?php echo $form['id_item']->renderLabel() ?></th>
	    <th><?php echo $form['nm_item']->renderLabel() ?></th>
	    <th><?php echo $form['st_item']->renderLabel() ?></th>
	    <th><?php echo $form['is_top']->renderLabel() ?></th>
	    <th><?php echo $form['id_tipo']->renderLabel() ?></th>
	    <th><?php echo $form['id_item_pai']->renderLabel() ?></th>
	    <th><?php echo $form['id_usuario']->renderLabel() ?></th>
	    <th><?php echo $form['ds_item']->renderLabel() ?></th>
	    <th><?php echo $form['ds_resumo_item']->renderLabel() ?></th>
	    <th><?php echo $form['ds_tags']->renderLabel() ?></th>
	    <th><?php echo $form['slug']->renderLabel() ?></th>
		<th>Ações</th>
    </tr>
	</thead>
  	<tbody>
  	<?php if (!count($item_list)): ?>
	<tr>
		<td align="center" colspan="12">NENHUM REGISTRO ENCONTRADO!</td>
	</tr>
	<?php endif; ?>
	<?php $i = 0; ?>
    <?php foreach ($item_list as $item): ?>
    <?php $bg = ($i++ % 2 == 0)? 'row0' : 'row1'; ?>
    <tr class="<?php echo $bg; ?>">
			    <td><a href="<?php echo url_for('conteudo/edit?id_item='.$item['id_item']) ?>"><?php echo $item['id_item'] ?></a></td>
				    <td><?php echo $item['nm_item'] ?></td>
			    <td><?php echo $item['st_item'] ?></td>
			    <td><?php echo $item['is_top'] ?></td>
			    <td><?php echo $item['id_tipo'] ?></td>
			    <td><?php echo $item['id_item_pai'] ?></td>
			    <td><?php echo $item['id_usuario'] ?></td>
			    <td><?php echo $item['ds_item'] ?></td>
			    <td><?php echo $item['ds_resumo_item'] ?></td>
			    <td><?php echo $item['ds_tags'] ?></td>
			    <td><?php echo $item['slug'] ?></td>
			<td>
						    	<?php
            echo link_to(
                ' ',
                url_for('conteudo/edit?id_item='.$item['id_item']),
                array('class'=>'icoEditar','title'=>'Editar item')
            )
        ?>
    	<?php
            echo link_to(
                ' ',
                url_for('conteudo/delete?id_item='.$item['id_item']),
                array('class'=>'icoExcluir','title'=>'Excluir item', 'confirm' => 'Tem certeza que deseja Excluir?')
            )
        ?>
	</td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>
</div>